<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>:nth-child</title>
<style>
* { color: gray }
div ul>li:nth-child(-n+3) { background-color: silver }
div ul>li:nth-child(even) { color: red }
div { position: fixed; top: 100px; left: 100px }
</style>
<!--
<script src="../../../src/uuMeta.js"></script>
<script src="../../../src/uuResize.js"></script>
<script src="../../../src/uuColor.js"></script>
<script src="../../../src/uuStyle.js"></script>
<script src="../../../src/uuStyleSheet.js"></script>
<script src="../../../src/uuQuery.js"></script>
<script src="../../../src/uuAltCSS.js"></script>
<script src="../../../src/uuAltCSS+.js"></script>
 -->
<script src="../../uuAltCSS.js"></script>

</head>
<body>
<input type="button" value="revalidate" onclick="uuAltCSS()" />
<div>
<p>:nth-child</p>
<pre style="text-align: left">
&lt;style&gt;
* { color: gray }
div ul&gt;li:nth-child(-n+3) { background-color: silver }
div ul&gt;li:nth-child(even) { color: red }
div { position: fixed; top: 100px; left: 100px }
&lt;/style&gt;
</pre>
<p>上から3つの背景をシルバーに、一行間隔で赤くします。</p>
 <ul>
  <li>list1</li>
  <li>list2</li>
  <li>list3</li>
  <li>list4</li>
  <li>list5</li>
 </ul>
</div>
<pre>
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
</pre>
</body>
</html>
